<%-- 
    Document   : index
    Created on : Sep 16, 2008, 1:40:38 PM
    Author     : andya
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
   <%@ page import="g360.WebXpdlValidation.ValidateXpdl" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="XpdlValidatorStyles.css"/>
        <title>XPDL Validation: Introduction</title>
    </head>
    <body>
        <h1>XPDL Validation Web Application: Introduction</h1>
        <p>To help authors of XPDL produce compliant documents, we have created this online validation 
            utility to perform a schema validation and referential integrity check on an XPDL 2.0 or 2.1 document.
        </p>
        <p> 
            The <a href="./ValidateXpdl" class="webappname">XPDL Validation web application</a>
            examines an XPDL file against a version of the XPDL schema at some conformance class level.
            An XPDL file can specify the schema version in the namespace attribute,
            <span class="code">xmlns:xpdl</span>, 
            of the <span class="code">Package</span> element and can specify the conformance class in the 
            <span class="code">BPMNModelPortabilityConformance</span> attribute of the 
            <span>ConfomanceClass</span> element.
            You can direct the validator to use the values in the XPDL file or you
            can request the validator to override these values.
        </p>
        <p>
            If you believe that your XPDL file is ready for validation 
            or you plan to have the validator override the namespace or conformance class, 
            you can go directly to the
            <a href="./ValidateXpdl" class="webappname">XPDL Validation web application</a>.
        </p>
        <p>
            We welcome your suggestions.  You can send comments or bug reports to
            <a href="mailto:rshapiro@processanalytica.com?subject:XPDL Validator Web App Feedback">
                Robert Shapiro
            </a>
        </p>
        <p>
            The rest of the document gives more a detailed presentation about how to:
            <ul>
                <li><a href="#step1">Assign the XPDL Namespace and Schema Location</a></li>
                <li><a href="#step2">Assign the conformance class attribute</a></li>
            </ul>
        </p>
<!--
        <p>
            <a href="./iFrameTest.html">test iframe</a>
        </p>
-->
        <h2>
            <a name="step1">Assigning XPDL Namespace and Schema Location</a>
        </h2>
        <p>
            For a schema validation to succeed, the XPDL document must specify the correct namespace. 
            Your tool may do all of this work for you through a high-level feature such as ‘Assign Schema”, 
            but here I break down the steps and show the changes to the XML.
        </p>
        <p>
            A namespace is assigned using the xmlns attribute on the root element (which is the Package element in XPDL). 
            Here’s an example (for XPDL 2.1):
        </p>
        <pre class="code">
            &lt;Package xmlns=&quot;http://www.wfmc.org/2008/XPDL2.1&quot;
                xmlns:xpdl=&quot;http://www.wfmc.org/2008/XPDL2.1&quot;
                xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
                xsi:schemaLocation=&quot;http://www.wfmc.org/2008/XPDL2.1 bpmnxpdl_31.xsd&quot;
                Id=&quot;a7065934-b35b-4bbe-9957-2cd5c9faa805&quot; 
                Name=&quot;My Diagram&quot;&gt;
                &lt;PackageHeader&gt;
                    &lt;XPDLVersion&gt;2.0&lt;/XPDLVersion&gt;
                    &lt;Vendor&gt;itp-commerce.com, Process Modeler 5.1502.9045&lt;/Vendor&gt;
                    &lt;Created&gt;2/9/2008 3:39:35 PM&lt;/Created&gt;
                    &lt;Documentation /&gt;
                &lt;/PackageHeader&gt;
                &lt;ConformanceClass BPMNModelPortabilityConformance="SIMPLE"/&gt;
                
                ...
        </pre>
        <p>
            The identifier for a namespace is called the namespace URI reference. 
            For XPDL 2.1 the namespace URI is:
        </p>
        <pre class="code">
            &quot;http://www.wfmc.org/2008/XPDL2.1&quot; 
        </pre>
        <p>
            The XPDL 2.0 version is:
        </p>
        <pre class="code">
            &quot;http://www.wfmc.org/2004/XPDL2.0alpha&quot;
        </pre>
        <p>
            It can be a bit confusing because you might expect to find something at 
            that location on the web, but a namespace URI is not a hyperlink, 
            just an identifier. The URI reference can be any valid non-empty URI,
            it does not have to look so much like a web address.
        </p>
        <p>
            Most XPDL documents assign the default namespace to XPDL. 
            The default namespace is the one used when an element does not have a 
            namespace prefix, as the example fragments show. This is specified with 
            the 
            <span class="code"> &quot;xmlns=http://www.wfmc.org/2008/XPDL2.1&quot; </span>
            attribute. 
            In our example we use a ‘belt and suspenders’ approach and assign 
            the same XPDL 2.1 namespace to the xpdl: prefix 
            using 
            <span class="code">&quot;xmlns:xpdl=http://www.wfmc.org/2008/XPDL2.1&quot;</span>
            .
        </p>

        <p>
            Now any tool looking at the document knows what namespace the elements 
            belong to -- both for  elements where no prefix is used, or where an 
            <span class="code">xpdl: </span>
            prefix is specified.
        </p>
        <p>
            Your tool may have also assigned a schema locations such as: 
        </p>
        <pre class="code">
            xsi:schemaLocation=&quot;http://www.wfmc.org/2008/XPDL2.1 bpmnxpdl_31.xsd
        </pre>    
        <p>
            This is optional: the online validator will supply the appropriate XPDL 2.0 or 2.1 schema depending on the namespace.
        </p>
        <h2>
            <a name="step2">Assigning the conformance class attribute</a>
        </h2>
        <p>
            XPDL 2.1 introduces the concept of conformance classes. This online validation 
            utility can warn when a document contains an element or attribute that is not 
            in the specified conformance class. You specify the documetns conformance 
            class using the ConformanceClass element.
        </p>
        <p>
            In the example XPDL fragment at the top of this page you can see the ConformanceClass 
            element that specifies the conformance class of the document:
        </p>
        <pre class="code">
            &lt;ConformanceClass BPMNModelPortabilityConformance=&quot;SIMPLE&quot;/&gt;
        </pre>
        <p>
            When the ConformanceClass BPMNModelPortabilityConformance 
            attribute is "SIMPLE" or “STANDARD”, the transfrom warns if 
            elements or attributes are found that are not in the specified 
            BPMN model portability conformance class.
        </p>
        <p>
            If the ConformanceClass and BPMNModelPortabilityConformance element 
            and attribute don’t exist  no conformance class checking is performed.
        </p>
        <p>
            Note: this attribute is new for XPDL 2.1, so no conformace class 
            checking happens to an XPDL 2.0 document. It is possible to &quot;force&quot; 
            checking of a 2.0 document by putting the the BPMNModelPortabilityConformance 
            attribute anyway, even though this will then cause a schema validaton error.
        </p>       
    </body>
</html>
